There are many situations in which determining if a specified sequence of characters is included in a larger pool of characters is needed. For example, a network security appliance may examine all packets traversing a network in order to detect malicious packets. For example, a packet may contain a portion of a virus that is identifiable by a certain sequence of characters in the packet. By examining every packet for the sequence of characters, it may be determined if the packet may contain at least part of the virus. Once it is determined that a particular character string is present, further action may be taken. For example, in the case of a network security appliance, the packet may be forwarded to additional logic to determine if the packet actually contains the virus, or if the character sequence just happened to be included in the packet for non-malicious reasons.